import permission from './permission'
import adminonly from './adminonly'

const install_permission = function(Vue) {
  Vue.directive('permission', permission)
}
const install_adminonly = function(Vue) {
  Vue.directive('adminonly', adminonly)
}

if (window.Vue) {
  // window['permission'] = permission
  Vue.use(install_permission); // eslint-disable-line
  Vue.use(install_adminonly); // eslint-disable-line
}

permission.install = install_permission
adminonly.install = install_adminonly
export { permission, adminonly }
